package com.meteor.api.feign.system;

import com.meteor.api.feign.ServerNames;
import com.meteor.api.feign.param.UserParam;
import com.meteor.api.feign.system.dto.StorageDTO;
import com.meteor.api.feign.system.dto.SysMerchantDTO;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * 系统服务
 *
 *  @author lynn
 */
@FeignClient(name = ServerNames.SYSTEM_SERVER_NAME, contextId = "system")
public interface SystemFeign {

    /**
     * 获取商户信息
     *
     * @param orgId 组织id
     * @return 是否发送成功
     */
    @GetMapping(value = "sys/merchant/orgMerchant/{orgId}")
//    SysMerchantDTO orgMerchant(@PathVariable("orgId")  String orgId);
    String orgMerchant(@PathVariable("orgId")  String orgId);


    /**
     * 获取用户信息
     *
     * @param param 用户id集合
     * @return
     */
    @PostMapping(value = "sys/user/userIds")
    String userList(@RequestBody UserParam param);


    /**
     * 获取组织信息
     *
     * @param orgId 组织id
     * @return
     */
    @GetMapping(value = "sys/org/{orgId}")
    String getOrg(@PathVariable("orgId")  String orgId);

    /**
     * 获取用户信息
     *
     * @param userId 用户id
     * @return
     */
    @GetMapping(value = "sys/user/feign/{userId}")
    String getUser(@PathVariable("userId")  String userId);

}
